package com.sibu.yx.promotion.persistence.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sibu.yx.promotion.persistence.model.sys.SysRole;

public interface SysRoleMapper extends BaseMapper<SysRole> {

    int deleteByPrimaryKey(Long id);


    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Long id);

    SysRole selectByRoleName(String name);

    boolean isExistByRoleName(@Param("id") Long id, @Param("name") String role);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    List<SysRole> selectAll();

    int updateStatusByPrimaryKey(@Param("id") Long id, @Param("available") Boolean available);

    int updateResourceIdsByPrimaryKey(@Param("id") Long id, @Param("resourceIds") String resourceIds);

    List<SysRole> selectByIds(@Param("ids") String ids, @Param("available") boolean available);

    List<SysRole> selectByNames(@Param("SysRoleNames") String SysRoleNames, @Param("available") boolean available);
}
